import _ from "lodash";
const add = (a, b) => {
  return a + b;
};

//创建图片方法
const createImg = (url) => {
  const img = document.createElement("img");
  img.src = url;
  return img;
};

const sort = (arr, key = "", type = "desc") => {
  return _.orderBy(arr, [key], [type]);
};

//ES Module
export { add, createImg, sort };
